import ListHandle from "@/service/list"
import {
  ListUrl,
  IGetListResult,
  IGetListData,
  IGetListInfo
} from "@/service/list/types"
import { IListState } from "./types"
import { IState } from "../types"
import { ActionTree, Store } from "vuex"
const actions: ActionTree<IListState, IState> = {
  //获取列表信息
  async getListInfo(
    { commit },
    payload: { pageInfo: IGetListInfo; url: ListUrl }
  ) {
    console.log("来了111111")

    const res = await await ListHandle.getListInfo({}, ListUrl.pandakill)
    const list: IGetListResult[] = res.data.list
    commit("savePandaKillData", list)
  }
}

export type IListActions = {
  moduleList: {
    getListInfo: () => any
  }
}

export { actions }
